<div class="toppanel-left">
                    	
<!--Home Slider Start-->
    <?php
        $catSlider = get_theme_mod('home_setting_slider');
        $args = array('posts_per_page' => 6,
                        'category__in' => array($catSlider));
        
        $sliderPost = new WP_Query($args);
        $images = array();
    ?>
	<div id="sync1" class="owl-carousel">
        <?php if($sliderPost->have_posts()): while($sliderPost->have_posts()): $sliderPost->the_post(); ?>
        <?php
            global $post;
            
            $args = array('post_type' => 'attachment',
                            'numberposts' => 1,
                            'post_status' => null,
                            'post_parent' => $post->ID);
            
            $attachments = get_posts($args);
            
            if($attachments):
                foreach($attachments as $attachment):
                $images[] = wp_get_attachment_image($attachment->ID, 'thumbnail');
                $attachment_image = wp_get_attachment_image($attachment->ID, 'full');
        ?>
    	<div class="item">
        	<div class="caption">
            	<h1>
                    <?php echo $attachment->post_title; ?>
                </h1>
                <div class="caption-link">
                    <a href="#">
                        <img src="<?php bloginfo('template_url'); ?>/images/plus-link.png" alt="link" />
                    </a>
                </div>
            </div>
        	<figure>
            	<?php echo $attachment_image; ?>
            </figure>
        </div>
        <?php 
                endforeach;
            endif; 
            endwhile; 
            endif; 
            wp_reset_postdata(); 
        ?>
    </div>
    
    <!--Slider Thumbnails-->
    <div id="sync2" class="owl-carousel width1">
        <?php foreach($images as $image): ?>
        <div class="item">
        	<figure>
            	<?php echo $image; ?>
            </figure>
        </div>
        <?php endforeach; ?>
    </div>
<!--Home Slider End-->

</div>